package com.pattern.design.service;


import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
import android.os.RemoteException;
import android.util.Log;
import java.util.Map;
import aidl.MyAIDLService;

/**
 * author:harisucici on 2018/10/30 11:36
 * email:harisucici@gmail.com
 * name:
 * todo:
 */


public class MyService extends Service {

    @Override
    public void onCreate() {
        super.onCreate();
    }


    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        return super.onStartCommand(intent, flags, startId);
    }


    @Override
    public void onDestroy() {
        super.onDestroy();
    }

    @Override
    public IBinder onBind(Intent intent) {
        return new Mybinder();
    }

    private class Mybinder extends MyAIDLService.Stub {

        @Override
        public String getString(){
            String string = "我是从服务App返回的";
            return string;
        }

    }
}